package io;

import java.io.*;


public class OOSDemo{
    public static void main(String[] args) throws IOException {
        String name = "刘苍松";
        int age = 55;
        String gender = "男";
        String[] otherInfo = {"刘桑，故乡的樱花开了","你的技术是真的好"};
        Person p = new Person(name,age,gender,otherInfo);

        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);

        oos.writeObject(p);
        System.out.println("写出完毕");
        oos.close();

    }
}
